﻿//------------------------------------------------------------------------------------------------------
// The MIT License (MIT) Copyright (c) 2014 Marton Rusko
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and 
// associated documentation files (the "Software"), to deal in the Software without restriction, 
// including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 
// and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, 
// subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or substantial 
// portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 
// LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//------------------------------------------------------------------------------------------------------

namespace RM.Banking.Unicredit.Statements
{
    /// <summary>
    /// Unicredit statmenet record for wire transfer (Forint vagy VIBER) records
    /// </summary>
    public class UnicreditStatementWireTransferRecord : UnicreditStatementRecord
    {
        #region Private fields

        //HACK: Fields initialized with reflection
#pragma warning disable 649

        //Referenciaszám
        [UnicreditRowMapping(2, 20)]
        private string referenciaszam;

        //(M1) GIS kód
        [UnicreditRowMapping(22, 5)]
        private string gisKod;

        //(M2 ) Küldő bank
        [UnicreditRowMapping(27, 3)]
        private string kuldoBank;

        //(M3) Küldő fiók
        [UnicreditRowMapping(30, 5)]
        private string kuldoFiok;

        //(M4) YYYYMMDD Felv.dátuma
        [UnicreditRowMapping(35, 8)]
        private string felvDatuma;

        //(M5) Sorszám
        [UnicreditRowMapping(43, 7)]
        private string sorszam;

        //(M6) Címzett bank
        [UnicreditRowMapping(50, 3)]
        private string cimzettBank;

        //(M7) Címzett fiók
        [UnicreditRowMapping(53, 5)]
        private string cimzettFiok;

        //(M8) Összeg
        [UnicreditRowMapping(58, 17)]
        private string osszeg;

        //(M9) Devizanem
        [UnicreditRowMapping(75, 3)]
        private string devizanem;

        //(M10) YYYYMMDD Esed.dátum
        [UnicreditRowMapping(78, 8)]
        private string esedekessegDatum;

        //(M11) Prioritás
        [UnicreditRowMapping(86, 1)]
        private string prioritas;

        //(M12) Kezd. bank hiv.szám.
        [UnicreditRowMapping(87, 9)]
        private string kezdemenyezoBankHivatkozasiSzam;

        //(M13) pénz.biz.szám.
        [UnicreditRowMapping(96, 6)]
        private string penzBizSzam;

        //(M14) Kezd.szlasz.
        [UnicreditRowMapping(102, 16)]
        private string kezdemenyezoSzamlaszam;

        //(M15) Kezd.nev
        [UnicreditRowMapping(118, 32)]
        private string kezdemenyezoNev;

        //(M16) Jogcím
        [UnicreditRowMapping(150, 4)]
        private string jogcim;

        //(M17) Címz.szlasz.
        [UnicreditRowMapping(154, 16)]
        private string cimzettSzamlaszam;

        //(M18) Címz.neve
        [UnicreditRowMapping(170, 32)]
        private string cimzettNeve;

        //(M19) YYYYMMDD Settl. dátum
        [UnicreditRowMapping(202, 8)]
        private string SettlDatum;

        //(M20) Megjegyzés 1
        [UnicreditRowMapping(210, 32)]
        private string megjegyzes1;

        //(M21) Megjegyzés 2
        [UnicreditRowMapping(242, 32)]
        private string megjegyzes2;

        //(M22) Megjegyzés 3
        [UnicreditRowMapping(274, 32)]
        private string megjegyzes3;

        //(M23) Kezd.alszlasz.
        [UnicreditRowMapping(306, 4)]
        private string kezdemenyezoAlszamlaszam;

        //(M24) Címz.alszlasz.
        [UnicreditRowMapping(310, 4)]
        private string cimzettAlszamlaszam;

        //(M25) Draft/checque num.
        [UnicreditRowMapping(314, 10)]
        private string draftOrChecqueNumber;

        //(M26) YYYYMMDD Kibocsátási dátum
        [UnicreditRowMapping(324, 8)]
        private string kibocsatasiDatum;

        //(M27) YYYYMMDD Fizetési dátum
        [UnicreditRowMapping(332, 8)]
        private string fizetesiDatum;

        //(M28) Amount for collection
        [UnicreditRowMapping(340, 17)]
        private string amountForCollection;

        //(M29) A bemutatás oka
        [UnicreditRowMapping(357, 20)]
        private string bemutatasOka;

        //(M30) Kedv. ügyfél kártya ID
        [UnicreditRowMapping(377, 19)]
        private string kedvezmenyezettUgyfelKartyaID;

        //(M31) Kártyaszám
        [UnicreditRowMapping(396, 1)]
        private string kartyaszam;

        //(M32) ATM kód.
        [UnicreditRowMapping(397, 15)]
        private string atmKod;

        //(M33) ISO 4909 kibocsát.azon.
        [UnicreditRowMapping(412, 11)]
        private string iso4909KibocsatasiAzonosito;

        //(M34) HHMMSS Fiz.idő
        [UnicreditRowMapping(423, 6)]
        private string fizetesiIdo;

        //(M35) Autorizációs ID
        [UnicreditRowMapping(429, 11)]
        private string autorizaciosId;

        //(M36) Visszavonás oka
        [UnicreditRowMapping(440, 2)]
        private string visszavonasOka;

        //(M37) ATM elfogadó név.
        [UnicreditRowMapping(442, 40)]
        private string atmElfogadoNev;

        //(M38) Collecting institution code
        [UnicreditRowMapping(482, 11)]
        private string collectionInstitutionCode;

        //(M39) Eredeti.kezd.bank
        [UnicreditRowMapping(493, 3)]
        private string eredetiKezdemenyzoBank;

        //(M40) Eredeti.kezd.fiók
        [UnicreditRowMapping(496, 5)]
        private string eredetiKezdemenyezoFiok;

        //(M41) Eredeti sorszám
        [UnicreditRowMapping(501, 7)]
        private string eredetiSorszam;

        //A partner bankjának neve
        [UnicreditRowMapping(508, 40)]
        private string partnerBankNeve;

#pragma warning restore 649

        #endregion

        #region Public properties

        //TODO: Add properties

        #endregion

        #region Constructor

        /// <summary>
        /// Initializes a UnicreditStatementWireTransferRecord
        /// </summary>
        /// <param name="line"></param>
        public UnicreditStatementWireTransferRecord(string line)
            : base(line)
        {
            //TODO: Read properies
        }

        #endregion
    }
}